package com.anxin.anxin_accident.reportManagement.service.impl;

import com.anxin.anxin_accident.persistence.mapper.AccCommMapper;
import com.anxin.anxin_accident.persistence.mapper.AccTestMapper;
import com.anxin.anxin_accident.persistence.model.AccTest;
import com.anxin.anxin_accident.reportManagement.service.AccidentReportManagementService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class AccidentReportManagementServiceImpl implements AccidentReportManagementService {
    @Resource
    private AccTestMapper accTestMapper;

    @Resource
    private AccCommMapper accCommMapper;


    @Override
    public IPage<AccTest> test(String test) {
        log.info("测试内容:" + test);
        int pageNum = 1;
        int pageSize = 10;
        Page<AccTest> page = new Page<>(pageNum, pageSize);
        IPage<AccTest> accTestIPage =   accCommMapper.selectPage(page,test);
        return accTestIPage;
    }
}
